package com.tanhua.model.vo;

import com.tanhua.model.domain.UserInfo;
import com.tanhua.model.mongo.Movement;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author ck
 * @date 2021/11/21 20:26
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserInfoVooo implements Serializable {


    private Long id; //用户id
    private String nickname; //昵称
    private String avatar; //用户头像
    private String birthday; //生日
    private String gender; //性别
    private Integer age; //年龄
    private String city; //城市
    private String education; //学历
    private Integer matchRate;//匹配分数
    private Integer marriage; //婚姻状态
    private Boolean alreadyLove; //是否喜欢他

    public static UserInfoVooo init(UserInfo userInfo) {
        UserInfoVooo vo = new UserInfoVooo();
        vo.setId(userInfo.getId());
        vo.setNickname(userInfo.getNickname());
        vo.setAvatar(userInfo.getAvatar());
        vo.setBirthday(userInfo.getBirthday());
        vo.setGender(userInfo.getGender());
        vo.setAge(userInfo.getAge());
        vo.setCity(userInfo.getCity());
        vo.setEducation(userInfo.getEducation());
        vo.setMatchRate(90);
        vo.setAlreadyLove(true);
        return vo;
    }
}
